#include <iostream>//main.cpp
#include <string>
#include "salary.cpp"

using namespace std;

int main()
{
    int n;
    cout<<"How many workers: n=";
    cin>>n;
    cout<<endl;
    Salary Salary1[n];
    int i;
    for(i=0;i<n;i++)
    {
        Salary1[i].Input();
        Salary1[i].CalFact();
    }
    Salary::Sort(Salary1,n);
    for(i=0;i<n;i++)
    {
        Salary1[i].Output();
    }

    return 0;
}
